package store.lunangangster.engine.impl.agenda;

import store.lunangangster.engine.impl.entity.ExecutionEntity;
import store.lunangangster.engine.impl.interceptor.CommandContext;

public abstract class AbstractOperation implements Operation {

  protected ExecutionEntity execution;
  protected CommandContext commandContext;

  public AbstractOperation(ExecutionEntity execution, CommandContext commandContext) {
    this.execution = execution;
    this.commandContext = commandContext;
  }

  @Override
  public ExecutionEntity getExecution() {
    return execution;
  }

  @Override
  public CommandContext getCommandContext() {
    return commandContext;
  }

  @Override
  public NodeFlowEngineAgenda getAgenda() {
    return commandContext.getAgenda();
  }
}
